package com.beyondsoft.common.core.remote;

import com.beyondsoft.common.core.constant.CommonConstants;
import com.beyondsoft.common.core.sys.initialization.FeignConfiguration;
import com.beyondsoft.common.core.remote.hystrix.UsersRemoteHystrix;
import com.beyondsoft.common.core.util.R;
import com.beyondsoft.common.core.model.vo.UsersVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = CommonConstants.APPLICATION_NAME_USERS, fallback = UsersRemoteHystrix.class, configuration = FeignConfiguration.class)
public interface UsersRemote {

    @PostMapping(value = "/users")
    R insert(@RequestBody UsersVO usersVO);

    @PutMapping(value = "/users")
    R update(@RequestBody UsersVO usersVO);

}
